added status check and a few parameter chagnes