backend for main page