split up into 3 modules + added draw checking. AI next