Solved - hardest bit was string formatting