style changes and some helper fns