change ap calculation
bug fixes and features added
current db update