merging code from altcointip before massive update