mini: add functions

Signed-off-by: Micky Ching <mickyching@gmail.com>