Modified getFrom() and getTo() to be calculated in setup