function analysis stuff added