Finished Adding alex's code into app