linear problem class implemented