generating cube sides, but still buggy