added self loop checks