updating code to titan version 0.4.x