modifier some structure and add ssome functions