Deleting karan goel's code to write my own :)