Revised all class work around to a more proper code