Updated version for personal use