upgrade features and made some bugfixes