recoded 2 functions as i was having issues getting them to work, follow
Professor Lews's advice to look at the smaller parts instead of the
whole problem