changed addNote function to take note as an argument instead of a note's attributes