Optimised it a bit