Changed update function and added globals for drop functions