code learned in tutorial