separating main from class def