Removed hard coded arrays and added foreach