Fixed Joshs Code