added support for dynamic resizing

Signed-off-by: Guyzmo <guyzmo+github@m0g.net>