Why some compounds form double bonds whereas some form single bonds?