handling flags
updated tests
removed pointless commits from history and updated tests