fixing contracts with check fun