added messages
readded functions and setup init chain