I think I'm close, I just need to nail down some type checking.