Added checking for other edges too. No functions yet