added inventory wrapping