Use proper def for GB,MB,KB and reuse code for mac