Added abs and manhattan distance