added self to all function calls