fixing several bugs and answering client demands