added 'position => value' logic