adds tests and straightens out cronlib fns; ready for real-world testing