Polish the implementation