working commit in need of opitmization