chechstraight extracted
chechflush extracted
removed unnecessary checks and flags