little rework to be cleaner