added condition public -function