work on this file, almost half modularised code