created functions, fixed code
fixed wording