made the code layout a bit clearner