Storing and dropping using a subroutine