#75 done, simplified code a lot