auxiliar funtions added