finished modifications, tested. seems to be working.