updated and minor fixes