Test function needs fleshing out with the same stuff in sync. Theres probably a neat little way of combining them.