fix some errors and add new ability