starting to break down functionality of pathing into functions