cleaned up lvl 1 code a bit