trying to solve the mysterious bug