fixed deposit and replaced memcpy