worked but wasn't pretty. Attempt 4.