class proto fuction