changed first 0 to 1