refactor to hs common style