Made slight modifications