#1 #3 #4 and some more enhancement