wrote some main methods