implemented main methods