restruct my code