finish common functionality.