move code to follow tutorial