attempt 1 - bug fix