slight modifications to previous commit