Added method and formal init_st, and added errors