Add version based on setting flag bits rather than passing ints around
 I really think that this should be quicker rather than slower!