created a preloader state but it does not do anything