add self define functions