entry point looks for proper main element