added inventory class for better responsibility division & testability