bug eliminated, attempt 1