stockin and stock out implementation