omitted unecessary code and fixed table