temporary commit. Worked on flag setting. To be continued later today