added typesafety on top