state -> pointer, create loop class