Adding helper functions.

Signed-off-by: Ronald Huereca <ronalfy@gmail.com>