implementation of drop handler