clean up loop code. check how much room is left in the slot when theres a match, before deposit