Implementing methods added by Michal Rewucki. Thanks Mike :*