uva 10557, modified