Implementaion and optimisation 3