updated syntax a bit and added a tableview delegate snippet