Punishment and the social contract theory