added in logic for controlling front-end