commented most to start from basics for debugging