removed empty list
added function composition