some slight modifications.. using latex