Added some code for integration