implemented 3 step procedure
implemented 3 step procedure