finished a few more functions