edited getOvelaps method (removed unnecessary variables)