back-end code