adding in some recomendations from stack overflow