moved 'set'to correct position