seems to work as expected take 2