implement main methods