added features for choosing output methods