Fixed data retrival and continued working on input scenario