more features and fixing bugs