added a necessary cast