Moved method into model