implemented virtual functions