the initialize function should return proper errors too