Made changes to increase performance