my algorithm coding