fixed few committed codes and added few more functions