initial version with working charge functionality