calling karl's code in the proper way.