added functionality to to check input vs solution