#3 and #4 Siyi

code for 3 and 4