trying to fix Maia's code