fixed input reset bug. we need input tests
better name for Type (cause scala is silly)