reorganised all my code