first function and view work