replaced bool vars with function list