update 4: my functions for assignment 2 (spacing)