Trying to implement drawing, but crashes