main function. Platform class defined