added hostname function