a lot of modification for deployment