modified code of vendin machine