still buggy, will get back to this later