wrote the procedures

now it's need for testing