fornt-end code and some further controller coding