Please, tell me that this is purely an academic exercise, and that this is in no way production code