adding tests and an option to defer calls