implemented algorithm in the create answer method