merged 2 versions