updated based on my friends advice