Added 2 coordinate case for time calc
Refactored