improving test coverage and adding support for init functions to transaction