Actually fixed ryans code.