Added improvements and bug fixed