implemented hand spacing calculation