implemented min & max values... very dirty though
Fixes #2
Fixes #3