Fixed Josh's code