Oh how I wish this were in a typed language