added type handling for Answer class