tying logic with front end