integer: implementation + tests