Added some functions needed to do odepchniecie