Added functions to constructor