updated answer logic