keep old function with minor changes

Signed-off-by: Chirayu Chiripal <chirayu.chiripal@gmail.com>