functions converted into methods