final version, couldn`t do delay and dynamic statistics on time