strengthen type checks and introduct a parent module