Add requirements
Fixed a bug
Added assertion