start upgrading this and make it platform agnostic