fixing drop position
restructuring code