updated loafs input processing