working good with great refactor