- simplify the code a bit