implement feature request #1489

Signed-off-by: Umair Khan <omerjerk@gmail.com>