Added code formatted with AppCode