updated main class added extention method