Initial (buggy) version, doesn't pass tests