added conditional for POST