tried to solve problem of weong answer printing to console : no luck