add frontend function for select