Working!! Needs more comments though