working but buggy version with basic controls