adding `max` field

Adds a `max` field as the third argument so that more than one function
call can happen within the millisecond time.
adding tests
Merge pull request #1 from calvinfo/add/max

Add/max