Coded it in another way