added flag for diferentitating unit and tower in unit class