added Joshs changes