added platform, reconfigured the platform function, i need to make it more reusable, its too specific right now.