add location check
drop un-used constant