move stuff to app_util