Enabled to work and refectored