back-end code in the first time