add targeted elements, fixed some bugs