started writing functions