misc updates, add sub-image function