changed where function from protected to public