updated for personal use