added end-state check before returning score