Working Code

Now onto formatting