Added account check function