fixed conn.close() compilation errors
removed getimage func