added type saftey