moving helper fucntions to head @Home