refactoring of selendroid part