added function to return selected objects (as per Git comment #28)