-Wrote angle function and input handler