Joshs newer code