added in john and matts code