added HomeDir function