SOme refactor