updated with minor fixes