forgot helper functions, this should do it