modded some lines to make compatible with promini