Little changes to #2 in order to make the code more uniform