prints correctly, but only works for specific instances