General fixed point theorems on metric spaces and 2-metric spaces