more functionality converted from previous version to the new one