refactoring: bp process's duplicated code.

maybe, ticket #1 is completed.

Signed-off-by: Godai Azuma <godai0519@gmail.com>