Compiles ok. No runtime errors either. needs testing!