setup stuff
some time function changes