Updaed library and added attachment support