updated error module
added main module