add modules support, bugfix