added attributes and better control of time