adding some frontend logic