added type signature to function