created general functions template