refactored the platform class