begin making draw.js reusable