Added select func and user struct (incomplete)

Still incomplete!!!