updated to work better with codr