Added refined formating on function