partly solved #18, only missing thing is getting the scope !