Code optimize Cranes