improved frontend codes