added logic for showing answers