implementation of some methods