move getCurrentInterval into parent Pattern class