Added and optimised methods

(optimisation was completely useless btw, make no difference but make me
feel good)