fixed bug in process method