Correct weight
Add first unit test

The rest should be relatively easy to implement.