some updated codes