finish first draft of irk2, need to debug and test