better code structure in search field