restructure the code to be compatible against the standard.