fixed throw exception and added inventory interface