a bit more of hacking, am going to refactor