Making functions in DAO