Add optional parameter to get only parts of a certain type