changed return code for align with align with reference