rearranged some code, fixed having to enter 0