aded typing functionality