add checks functions
rename function chk_eop