Add popN function
Use bind operator