carrying on from where I left off on the .NET attempt