improved the gravatar function