add constructor extend function to modules