main and handler are only two functions now