Shouldnt this be moved to API?