@Override
	public Account removeAccount(User owner, Account account) {
		
		PreparedStatement pStmt = null;
		
		Account ac = null;
		Integer result;
		
		ac = getAccount(account.getId());
		
		if (ac != null){
			
			try {
				
				pStmt = conn.prepareStatement("DELETE FROM ACCOUNT WHERE user_login = ? AND id = ?;");
				pStmt.setString(1, owner.getLogin());
				pStmt.setInt(2, account.getId());
				result = pStmt.executeUpdate();
				
				Set<Record> records = getRecords(ac);
				
				for(Record r:records){
					
					removeRecord(ac, r);
					
				}
				
			} catch (SQLException e) {

				e.printStackTrace();
				
			} finally {
				
				closeResource(pStmt);
				
			}
			
		}

		return ac;
		
	}