front-end logic implementation + layout