A generalization of ekellandz’s variational principle