changed prototype
error management
main structure