6061c88e2b
this commit applies another method of doing this function. The checks happen in the same layer, instead of two layers