Update working code

Basic IA, improvement have to be done