moved method to private