Got rid of redundant isTarget function