optimising a little and renaming