update 2: my functions for assignment 2 (spacing)