Added the 'getAnswer' function