added tests for immediate function.