modification added by merge, doesnt work properly