finished some code