add foreach and bind function