debug in progress. Compilable but buggy. Doing it for Riya for him to compile his stuff
merged with riya's code