updated code to V0.1