add and fix several things