fixed nested functions updated readme added a complex case