made layout more functional, creating new play logic