enhance and refactor the edit button
add search bar for device