added some logging and trace statement for practice