Added timeframe functionality(untested)