added local time stuff, documented code, added "header"