amend check function