adjusting code because of atom api changes