initial class and common functions