Author: seckinger, evan leukanech, additions by ruby