optimize
more better checks
comment