improving drop code